Skip to content

feat(inbox): gate signals inbox behind posthog-code-inbox flag#1828

Open
posthog[bot] wants to merge 5 commits intomainfrom
posthog-code/gate-inbox-behind-feature-flag
Open

feat(inbox): gate signals inbox behind posthog-code-inbox flag#1828
posthog[bot] wants to merge 5 commits intomainfrom
posthog-code/gate-inbox-behind-feature-flag

Conversation

@posthog
Copy link
Copy Markdown
Contributor

@posthog posthog Bot commented Apr 22, 2026

Summary

Gates the Signals Inbox behind the posthog-code-inbox feature flag (currently rolled out to 100% in PostHog).

  • Hides the InboxItem in the sidebar when the flag is off
  • Skips rendering InboxView in MainLayout when the flag is off, even if the view is navigated to
  • Skips the sidebar's signal-count polling (useInboxReports) when the flag is off to avoid unnecessary network requests

Flag: posthog-code-inbox — boolean, 100% rollout.

Test plan

  • With the flag enabled, the inbox sidebar item renders and the inbox view is reachable
  • With the flag disabled, the inbox sidebar item is hidden and the inbox view does not render
  • With the flag disabled, network tab shows no getSignalReports polling from the sidebar badge

Created with PostHog Code

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 22, 2026

Prompt To Fix All With AI
This is a comment left during a code review.
Path: apps/code/src/renderer/features/onboarding/components/WelcomeScreen.tsx
Line: 60

Comment:
**`CYCLE_START_DELAY_MS` uses all-features count regardless of flag**

`CYCLE_START_DELAY_MS` is a module-level constant computed from `ALL_FEATURES.length` (5), so when inbox is disabled and only 4 features render, the stagger delay before cycling begins is 100 ms longer than necessary. The constant could be moved inside the component (or derived from `features`) to stay in sync with the actual list length.

How can I resolve this? If you propose a fix, please make it concise.

Reviews (1): Last reviewed commit: "feat(inbox): gate remaining inbox surfac..." | Re-trigger Greptile


const CYCLE_INTERVAL_MS = 2500;
const CYCLE_START_DELAY_MS = FEATURES.length * 100 + 400;
const CYCLE_START_DELAY_MS = ALL_FEATURES.length * 100 + 400;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 CYCLE_START_DELAY_MS uses all-features count regardless of flag

CYCLE_START_DELAY_MS is a module-level constant computed from ALL_FEATURES.length (5), so when inbox is disabled and only 4 features render, the stagger delay before cycling begins is 100 ms longer than necessary. The constant could be moved inside the component (or derived from features) to stay in sync with the actual list length.

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/code/src/renderer/features/onboarding/components/WelcomeScreen.tsx
Line: 60

Comment:
**`CYCLE_START_DELAY_MS` uses all-features count regardless of flag**

`CYCLE_START_DELAY_MS` is a module-level constant computed from `ALL_FEATURES.length` (5), so when inbox is disabled and only 4 features render, the stagger delay before cycling begins is 100 ms longer than necessary. The constant could be moved inside the component (or derived from `features`) to stay in sync with the actual list length.

How can I resolve this? If you propose a fix, please make it concise.

PostHog Code and others added 3 commits April 22, 2026 16:36
Hides the sidebar inbox item and the inbox view when the
posthog-code-inbox feature flag is disabled. Also skips the
sidebar signal-count polling when the flag is off so we don't
pay the network cost for users who can't see the inbox.

Generated-By: PostHog Code
Task-Id: f5d4a0ab-7de3-4bcb-a465-bbcf6cf7c22a
…flag (#1840)

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
…ed (#1843)

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
@joshsny joshsny force-pushed the posthog-code/gate-inbox-behind-feature-flag branch from 8860d13 to accc99f Compare April 22, 2026 15:36
@joshsny joshsny requested a review from a team April 23, 2026 10:03
@joshsny
Copy link
Copy Markdown
Contributor

joshsny commented Apr 23, 2026

@copilot resolve the merge conflicts in this pull request

@joshsny joshsny enabled auto-merge (squash) April 23, 2026 11:36
auto-merge was automatically disabled April 23, 2026 11:40

Head branch was pushed to by a user without write access

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 23, 2026

@copilot resolve the merge conflicts in this pull request

Resolved and pushed in commit 3eca7dcf.

I merged origin/main into this branch and resolved the conflicts in:

  • apps/code/src/renderer/components/MainLayout.tsx
  • apps/code/src/renderer/features/settings/components/SettingsDialog.tsx

No user-facing UI changes were introduced by this conflict resolution, so there’s no meaningful UI screenshot to share.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • api.anthropic.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/code/code/node_modules/@anthropic-ai/claude-agent-sdk/cli.js --output-format stream-json --verbose --input-format stream-json --model opus --betas context-1m-2025-08-07 --permission-prompt-tool stdio --tools default --setting-sources=user,project,local --permission-mode bypassPermissions --allow-dangerously-skip-permissions --include-partial-messages (dns block)
  • www.electronjs.org
    • Triggering command: /opt/hostedtoolcache/node/24.15.0/x64/bin/node /opt/hostedtoolcache/node/24.15.0/x64/bin/node /home/REDACTED/work/code/code/node_modules/@electron/rebuild/lib/module-type/node-gyp/worker.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI requested a review from joshsny April 23, 2026 11:43
Copy link
Copy Markdown
Member

@Twixes Twixes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of things, coming from our Slack thread:

  • Inbox should be default rolled-out, with it being gated if the flag is on; it's a core part of PH Code
  • the gated state should be a waitlist, something along the lines of "We're just scaling up this feature to provide you with a great experience; sign up and we'll let you know when self-driving is available to you"

…ed logic (#1860)

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants